<?php
$id = isset($_GET['id'])?(int)$_GET['id']:0;
$cid = isset($_GET['c_id'])?(int)$_GET['c_id']:0;

$lanmu = get_down_lanmu_by_lc_id($id);
$qx=show_down_qx($id);

if($qx==1){
	if($_SESSION['user_title']==''){
		echo '<script>alert("抱歉本条下载信息登陆后才可查看!");history.back();</script>';
	}
}
$where_sql=" where lc_id = {$id} ";
if($c_id){
		
		$where_sql.=" and c_id ={$c_id}";
		}
$sql = "select * from ".lc()."_down ".$where_sql;;
$rs = mysql_query($sql);
if($rs){
	$rows = mysql_fetch_assoc($rs);
	
	}
?>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title><?php echo top_keys(7)?></title>
<meta name="description" content="<?php echo top_keys(9)?>">
<meta name="keywords" content="<?php echo top_keys(8)?>">
<link href="<?php echo TPL_URL?>style.css" rel="stylesheet" type="text/css">
</head>
<body>
<div id="body"><?php require('head.php')?>
  <div id="middle">
    <div id="left">
      <div id="type">
        <div class="title">
          <h1>栏目分类</h1>
        </div>
        <ul>
          <?php echo get_down_type_ul(0,0,$lanmu)?>
        </ul>
      </div>
      <!-- type --></div>
    <!-- left -->
    <div id="right">
      <div class="title">
        <h1><?php echo get_lanmu_name($lanmu)?></h1>
        <h3><a href="index.php">首页</a>><?php echo get_down_type_title_by_lc_id($id)?></h3>
      </div>
      <div id="news_con">
	   <h1 class="h1"><?php echo $rows['lc_title']?></h1>
        <h2 class="h2">添加时间：<?php echo date("Y-m-d",strtotime($rows['lc_datetime']))?> 点击量：<?php echo $rows['lc_hits']?></h2>
        <?php echo $rows['lc_content']?> <br>
        下载地址：<a href="<?php echo $rows['lc_url']?>"><?php echo $rows['lc_url']?></a>
        <div class="page"> 上一条： <?php echo get_down_title_next($id)?>  <br>
          下一条：<?php echo get_down_title_last($id)?></div>
      </div>
    </div>
    <!-- right -->
    <div class="clear"></div>
  </div>
  <?php require('bot.php') ?></div>
<!-- body --> 
<br>
<br>
</body>
</html>
